<<<<<<< HEAD
from . import models
from rest_framework import generics

from django.views.generic import TemplateView, RedirectView

class TeamList(TemplateView):
    queryset = Team.objects.all()
    serializer_class = TeamSerializer

'''
class TeamDetail(generics.RetrieveUpdateDestroyAPIView):
    queryset = Team.objects.all()
    serializer_class = TeamSerializer

class TeamUpdateView(UpdateView):
    model = Team
    fields = '__all__'
=======
from django.views.generic.edit import CreateView
from django.shortcuts import render

# Create your views here.
from django.views.generic import ListView
from cm.models import Team

class TeamList(ListView):
    model = Team
>>>>>>> develop

def teams(request):
    return render(request, 'cm/team_list.html')

def modalsample(request):
    return render(request, 'cm/modalsample.html')


class NewsCreateView(CreateView):
    model = Team
    fields = '__all__'

    def form_valid(self, form):
        self.object = form.save()
        return render(self.request, 'ncm/team_list.html', {'team_list': self.object})
<<<<<<< HEAD

'''
from rest_framework import viewsets
from . import serializers

class StudentViewSet(viewsets.ModelViewSet):
    queryset = models.Student.objects.all()
    serializer_class = serializers.StudentSerializer

class UniversityViewSet(viewsets.ModelViewSet):
    queryset = models.University.objects.all()
    serializer_class = serializers.UniversitySerializer

class TeamViewSet(viewsets.ModelViewSet):
    queryset = models.Team.objects.all()
    serializer_class = serializers.TeamSerializer

class ContractViewSet(viewsets.ModelViewSet):
    queryset = models.Contract.objects.all()
    serializer_class = serializers.ContractSerializer

class ContractDetailViewSet(viewsets.ModelViewSet):
    queryset = models.ContractDetail.objects.all()
    serializer_class = serializers.ContractDetailSerializer

class PaymentViewSet(viewsets.ModelViewSet):
    queryset = models.Payment.objects.all()
    serializer_class = serializers.PaymentSerializer
=======
>>>>>>> develop
